﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace Budget.Config
{
    public static class BudgetConfig
    {
        public static string BudgetConnectionString
        {
            get
            {
                string connection;

#if DEBUG
                connection = BudgetDevConnection;
#else
                connection = BudgetConnection;
#endif
                return connection;
            }
        }

        public static string FamilyConnection
        {
            get { return ConfigurationManager.ConnectionStrings["family"].ConnectionString; }
        }

        private static string BudgetConnection
        {
            get { return ConfigurationManager.ConnectionStrings["budget"].ConnectionString; }
        }

        private static string BudgetDevConnection
        {
            get { return ConfigurationManager.ConnectionStrings["budget-dev"].ConnectionString; }
        }

        public static string InmemoryConnection
        {
            get { return ConfigurationManager.ConnectionStrings["inmemory"].ConnectionString; }
        }

        public static string InmemoryFileConnection
        {
            get { return ConfigurationManager.ConnectionStrings["inmemory-file"].ConnectionString; }
        }
    }
}
